#include "widget.h"
#include "ui_widget.h"
#include<QPushButton>
#include<QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QPushButton* button1=new QPushButton("按钮一",this);
    QPushButton* button2=new QPushButton("按钮二",this);



    button1->move(0,10);
    button2->move(300,300);//基于窗口（widegt）

    qDebug()<<"button1X："<<button1->x()<<"button1Y: "<<button1->y();
    qDebug()<<"button2X："<<button2->x()<<"button2Y: "<<button2->y();
}

Widget::~Widget()
{
    delete ui;
}
